package com.sunny.feign;

import com.sunny.feign.cloud.FeignService;
import com.sunny.feign.custom.CustomFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Sunny
 * @date 2020/2/24
 */
@RestController
public class HelloController {

    @Resource
    private FeignService feignService;

    @Resource
    private CustomFeignService customFeignService;

    @GetMapping("/feign/hello")
    public String hello(String msg) {
        return feignService.hystrixSay(msg);
    }

    @GetMapping("customFeign/hello")
    public String customFeignHello(String msg) {
        return customFeignService.hystrixSay(msg);
    }
}
